<template>
	<view>
		<!-- 输出 -->
		<view>{{ username }}</view>
		<!-- 循环 -->
		<view v-for="one in tel">{{ one }}</view>
		<!-- 判断 -->
		<view v-if="age>=18">
			<button @tap="clieckButton()">这是一个按钮</button>
		</view>
		<!-- 双向绑定 -->
		<view>
			<input v-model="address" type="text" placeholder="请输入地址" />
		</view>
		<view>{{address}}</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			username: 'zhangzhixi',
			tel: ['13166666666', '18100000000'],
			age: 18,
			address:""
		};
	},
	methods: {
		clieckButton:function(){
			uni.showToast({
				title:"点击了按钮"
			})
		}
	}
};
</script>

<style></style>
